<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a="http://richfaces.org/a4j" 
	template="/embed/templateForRegister.xhtml">
	
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />    
  <ui:define name="topnav">
            <ui:include src="/embed/menu.xhtml">
                <ui:param name="page" value="home" />
            </ui:include>
   </ui:define> 
   <ui:define name="body"> 
		<rich:panel>
			<f:facet name="header">注册</f:facet>
			<h:form styleClass="register">
				<s:validateAll>
					<div class="formRow"><h:outputLabel for="username">用户名<em>*</em>
					</h:outputLabel> 
					<h:inputText id="username" value="#{currentCustomer.customerName}"
						required="true" />
					<h:outputText>由字母，数字，下滑线组成，须以字母开头，6-10位</h:outputText> 
					<div class="validationError"><h:message for="username" /></div>
					</div>

					<div class="formRow"><h:outputLabel for="password">密码<em>*</em>
					</h:outputLabel> <h:inputSecret id="password" value="#{currentCustomer.password}"
						required="true" />
				   <h:outputText>由字母，数字，下滑线组成，密码是6-10位</h:outputText> 
					<div class="validationError"><h:message for="password" /></div>
					</div>
     
     
					<div class="formRow"><h:outputLabel for="confirmPassword">确认密码<em>*</em>
					</h:outputLabel>
					 <h:inputSecret id="confirmPassword"
						value="#{register.confirmPassword}" required="true" />
					<div class="validationError"><h:message for="confirmPassword" /></div>
					</div>

					<div class="formRow"><h:outputLabel for="email">邮箱<em>*</em>
					</h:outputLabel> <h:inputText id="email" value="#{currentCustomer.email}" required="true"
						styleClass="wide" />
						<h:outputText>须满足标准格式，如wangq649@163.com</h:outputText> 
					<div class="validationError"><h:message for="email" /></div>
					</div>

					<div class="formRow"><h:outputLabel for="question">问题<em>*</em>
					</h:outputLabel> 
					<h:selectOneMenu id="question" value="#{register.honorific}">
						<s:selectItems value="#{honorifics}" var="honorific"
							label="#{honorific.label}"  />
						<s:convertEnum />
					</h:selectOneMenu>
					</div>
					
					<div class="formRow">
					<h:outputLabel for="answer">回答<em>*</em>
					</h:outputLabel>
					 <h:inputText id="answer" value="#{currentCustomer.answer}" required="true"
						styleClass="wide" />
				  <h:outputText>请选择问题，以便找回密码</h:outputText> 					
					<div class="validationError"><h:message for="answer" /></div>
					</div>
			    <div class="formRow">
                <h:outputLabel for="verifyCaptcha"><h:graphicImage value="/seam/resource/captcha"/><em>*</em></h:outputLabel>
                <h:inputText id="verifyCaptcha" value="#{captcha.response}" required="true"/>
                <div class="validationError"><h:message for="verifyCaptcha"/></div>
			</div>
				</s:validateAll>

				<h:commandButton id="register" value="注册"
					action="#{register.register}" />


			</h:form>

		</rich:panel>

	</ui:define>

</ui:composition>

